$OpenBSD: patch-Makefile,v 1.2 2015/06/26 18:25:54 ajacoutot Exp $
--- Makefile.orig	Fri Jan 21 18:02:17 2005
+++ Makefile	Fri Jun 26 20:12:55 2015
@@ -18,15 +18,15 @@ endif
 
 PLUGIN_DIR ?= /usr/local/lib/gkrellm2/plugins
 
-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE) $(IMLIB_INCLUDE) $(XMMS_INCLUDE)
-LIBS = $(GTK_LIB) $(IMLIB_LIB) $(XMMS_LIB)
-LFLAGS = -shared -lpthread
+CFLAGS += -O2 -Wall -fPIC $(GTK_INCLUDE) $(IMLIB_INCLUDE) $(XMMS_INCLUDE)
+LIBS += $(GTK_LIB) $(IMLIB_LIB) $(XMMS_LIB)
+LFLAGS += -shared -lpthread
 
 ifdef USE_BMP
    FLAGS += -DUSE_BMP
 endif
 
-LOCALEDIR ?= /usr/share/locale
+LOCALEDIR ?= ${PREFIX}/share/locale
 ifeq ($(enable_nls),1)
    FLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\"
    export enable_nls
@@ -35,8 +35,6 @@ PACKAGE ?= gkrellmms
 FLAGS += -DPACKAGE="\"$(PACKAGE)\"" 
 export PACKAGE LOCALEDIR
 
-CC ?= gcc 
-CC += $(CFLAGS) $(FLAGS)
 
 INSTALL = install -c
 INSTALL_PROGRAM = $(INSTALL) -s
@@ -47,7 +45,7 @@ all:	$(BIN_FILENAME).so
 	(cd po && ${MAKE} all )
 
 $(BIN_FILENAME).so: $(OBJS)
-	$(CC) $(OBJS) -o $(BIN_FILENAME).so $(LFLAGS) $(LIBS)
+	$(CC) ${CFLAGS} $(OBJS) -o $(BIN_FILENAME).so $(LFLAGS) $(LIBS) -I${PREFIX}/include
 
 clean:
 	rm -f *.o core *.so* *.bak *~
